# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=bijiben
pkgver=3.30.1
pkgrel=1
pkgdesc="Write out notes, every detail matters"
url="https://wiki.gnome.org/Apps/Bijiben"
arch=(x86_64)
license=(GPL)
depends=(tracker webkit2gtk gnome-online-accounts evolution-data-server)
makedepends=(evolution python appstream-glib yelp-tools git meson)
_commit=93310671f94277fc99750ae0e0d4f55b2d82ed7f  # tags/BIJIBEN_3_30_1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-notes.git#commit=$_commit"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd gnome-notes
  git describe --tags | sed 's/^BIJIBEN_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd gnome-notes

  git submodule init
  git config --local submodule.subprojects/libgd.url "$srcdir/libgd"
  git submodule update
}

build() {
  arch-meson gnome-notes build
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
